<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('电话工单信息')"/>
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">

    <style>
        label {
            font-weight: bold;
        }

        @font-face {
            font-family: 'huawen';
            src: url("/fonts/huawen.woff2");
        }
        .add-wfTag {
            color: #fff;
            background-color: #3e94c3;
            border-color: #12a1d5;
        }
        .commonTag {
            margin: 5px;
            cursor: pointer;
        }
    </style>
</head>

<body style="background-color: #F4F6FA;font-size: 13px;font-family:'huawen' ;font-weight: bold;">
<div class="main-content" style="margin: 0;padding: 0;">
    <form id="form-user-add" th:object="${workForm}" class="form-horizontal" style="background-color: #F4F6FA">
        <input type="hidden" name="telId" th:value="*{getDealPk}">
        <div class="col-sm-12 grid-container" style="display: flex;">
            <!--     左       -->
            <div class="col-sm-6 entering-page">
                <!--   来信内容     -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">来电及工单信息</h4>
                    <div style="margin-left: 20px;">
                        <button type="button" class="btn btn-sm add-wfTag" onclick="makeTag()">打标签
                        </button>
                    </div>
                </div>
                <!--工单标签-->
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-3 control-label entering-pd" style="margin-left: -5px;">该工单标签</label>
                        <div class="col-sm-9 card card-body">
                            <th:block th:if="${wfTag} != null" th:each="item : ${wfTag}">
                                <span class="badge badge-pill badge-light commonTag" th:title="${item['tagName']}" th:value="${item['tagNo']}">[[${item['tagName']}]]</span>
                            </th:block>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">联系电话：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{fromTelA}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">工单号：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{workFormNo}]]</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">来电人：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{fromName}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">性别：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{fromSex eq '1' ? '男' : '女'}]]</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">区域：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{fmAreaName}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">地址：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{fmAddress}]]</span>
                        </div>

                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">流水号：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{wsCode}]]</span>
                        </div>
                        <span th:with="userRole=${user.roles.get(0).roleId}"
                              th:unless="${userRole != 390 && userRole != 360 && userRole != 310 && userRole != 340 && userRole != 290 && userRole != 260}">
                            <label class="col-sm-2 control-label entering-pd">查询码：</label>
                            <div class="col-sm-3">
                                <span class="tworkformprocess-span">[[*{wsKey}]]</span>
                            </div>
                        </span>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">网上公开：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span"><span th:classappend="*{openFrom == 1 ? 'spLRed' : 'spLBlue'}">[[*{openFrom == 1 ? '是' : '否'}]]</span>(来电人)</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">建议公开：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span"><span th:classappend="*{openFrom == 1 ? 'spLRed' : 'spLBlue'}">[[*{openX == 1 ? '是' : '否'}]]</span>(市网络理政办)</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">创建人：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{iptWorker}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">创建时间：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{#dates.format(iptTime,'yyyy-MM-dd HH:mm:ss')}]]</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12" style="margin-bottom: 10px">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">工单性质：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{setProName}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">拟办时限：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{#dates.format(wfLimit,'yyyy-MM-dd HH:mm:ss')}]]</span>
                        </div>
                    </div>
                </div>
            </div>
            <!--     右       -->
            <div class="col-sm-6 entering-page">
                <div class="col-sm-12">
                    <!--   来电内容     -->
                    <div class="col-sm-12 tltieBoder">
                        <div class="blueBorder"></div>
                        <h4 style="margin:0 0 0 10px">来电内容</h4>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-3 control-label entering-pd">主题：</label>
                            <div class="col-sm-9">
                                <span class="tworkformprocess-span">[[*{wsTopic}]]</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-3 control-label entering-pd">通话内容：</label>
                            <div class="col-sm-8">
                                <!-- <span class="tworkformprocess-span">[[*{fmContent}]]</span> -->
                                <textarea  id="fmContent" th:text="*{fmContent}" maxlength="1000" class="form-control phoneRemark" readonly style="height: 160px"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12" style="margin-bottom: 10px">
                        <div class="form-group">
                            <label class="col-sm-3 control-label entering-pd">来电类别：</label>
                            <div class="col-sm-3">
                                <span class="tworkformprocess-span">[[*{dfmClaName}]]</span>
                            </div>
                            <label class="col-sm-2 control-label entering-pd">内容类别：</label>
                            <div class="col-sm-3">
                                <span class="tworkformprocess-span">[[*{dcntAname}]]</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/js/extension.js}"></script>

<script>
    var prefix = ctx + "system/mMailWF";

    // 添加工单标签
    function makeTag(){
        var telId = $("[name='telId']").val();
        var url = ctx + "system/tag/addTelWFTag?telId=" + telId;
        var title = "添加工单标签";
        $.modal.open(title,url, '800', '500',callback);
    }

    function callback(index, layero){
        var iframeWin = layero.find('iframe')[0];
        iframeWin.contentWindow.submitHandler();
    }
</script>
</body>
</html>

